<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 条件运算符也叫三元运算符
        // 条件表达式？语句1：语句2
        var a = 123;
        var b = 3;
        var max = a > b ? a : b;
        // 条件表达式不是布尔值，先转成布尔值
        var res = "hello" ? 'a' : 'b'
        console.log(res);
        res = "false" ? 'a' : 'b'
        console.log(res);

        console.log(Boolean("false"));
    </script>
</body>

</html>